package com.itfitness.lifecycledemo;

import android.util.Log;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;

/**
 * @ProjectName: LifeCycleDemo
 * @Package: com.itfitness.lifecycledemo
 * @ClassName: MyApplicationObserver
 * @Description: java类作用描述
 * @Author: 作者名
 * @CreateDate: 2021/9/14 20:59
 * @UpdateUser: 更新者：
 * @UpdateDate: 2021/9/14 20:59
 * @UpdateRemark: 更新说明：
 */
public class MyApplicationObserver implements LifecycleObserver {
    private static final String TAG = "MyApplicationObserver";
    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    public void onCreate(){
        Log.e(TAG,"onCreate");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    public void onStart(){
        Log.e(TAG,"onStart");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    public void onResume(){
        Log.e(TAG,"onResume");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    public void onPause(){
        Log.e(TAG,"onPause");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    public void onStop(){
        Log.e(TAG,"onStop");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    public void onDestroy(){
        Log.e(TAG,"onDestroy");
    }
}
